﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/User/ViewMasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Forms</title>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LeftMenuContent" runat="server">
    <li><a href="/User/Index"><span class="glyphicon glyphicon-dashboard"></span>首页</a></li>
    <li><a href="/User/Widgets"><span class="glyphicon glyphicon-th"></span>医生</a></li>
    <li><a href="/User/Charts"><span class="glyphicon glyphicon-stats"></span>实时数据</a></li>
    <li><a href="/User/Tables"><span class="glyphicon glyphicon-list-alt"></span>数据历史</a></li>
    <li><a href="/User/Forms"><span class="glyphicon glyphicon-pencil"></span>病历</a></li>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
        <div class="row">
            <ol class="breadcrumb">
                <li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
                <li class="active">设置</li>
            </ol>
        </div>
        <!--/.row-->

        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">设置</h1>
            </div>
        </div>
        <!--/.row-->


        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">设置窗口</div>
                    <div class="panel-body">
                        <div class="col-md-8">
                            
                                <div class="row">
                                    <%--<div class="col-xs-8">--%>
                                        <div class="form-group">
                                            <label>姓名</label>
                                            <input class="form-control" placeholder="Placeholder" value="<%:ViewData["UserName"] %>" id="txtBox_Name">
                                        </div>
                                        <div class="form-group">
                                            <label>密码</label>
                                            <input class="form-control" type="password" placeholder="Placeholder" value="<%:ViewData["UserPassword"] %>" id="txtBox_Password">
                                        </div>
                                  <%--  </div>--%>

<%--                                    <div class="col-xs-4">
                                        <form role="form" id ="myForm">
                                            <div class="form-group">
                                                <label>上传照片</label>
                                                <img src="http://placehold.it/80/dde0e6/5f6468" class="img-circle">
                                                <input type="file" style="border: 1px dotted #ccc" name="fileUp">
                                                <small class="help-block">上传小于1M一寸免冠照片（*.jpg  *.png）</small>
                                            </div>
                                        </form>
                                    </div>--%>
                                </div>
                                <div class="row">
                                    <div class="col-xs-4">
                                        <div class="form-group">
                                            <label>科室：</label>
                                            <div class="form-group">
                                                <select class="selectpicker form-control" id="office_Select">
                                                    <option>内科</option>
                                                    <option>外科</option>
                                                    <option>妇产科</option>
                                                    <option>儿科</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-4">
                                        <label>年龄：</label>
                                        <input class="form-control" id="old_TxtBox" value="<%:ViewData["UserOld"] %>">
                                    </div>
                                    <div class="col-xs-4">
                                        <label>性别：</label>
                                        <div class="form-group">
                                            <select class="selectpicker form-control" id="sex_Select">
                                                <option>男       </option>
                                                <option>女       </option>
                                            </select>
                                        </div>
                                    </div>

                                </div>

                                <div class="row">
                                    <div class="col-xs-4">
                                        <label>身高：</label>
                                        <input class="form-control" id="height_TxtBox"  value="<%:ViewData["UserHeight"] %>">
                                    </div>
                                    <div class="col-xs-4">
                                        <label>体重：</label>
                                        <input class="form-control" id="wigh_TxtBox"  value="<%:ViewData["UserWeight"] %>">
                                    </div>
                                    <div class="col-xs-4">
                                        <div class="input-append date form_datetime">
                                            <label>入院时间</label>
                                            <input size="16" type="text" value="<%:ViewData["UserTime"] %>" readonly class="form_datetime1 form-control" id="time_select">
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label>联系电话：</label>
                                    <input class="form-control" id="tel_TxtBox"  value="<%:ViewData["UserTel"] %>">
                                </div>

                                <div class="form-group">
                                    <label>邮箱：</label>
                                    <input class="form-control" id="email_TxtBox"  value="<%:ViewData["UserEmail"] %>">
                                </div>

                                <button type="submit" class="btn btn-primary" id="btn_Update">提交修改</button>
						        <button type="reset" class="btn btn-default" id="btn_Pass">放弃修改</button>
                               
                       
                        </div>
                        <div class="col-md-4">

                            <div class="form-group">
                                    <label>病情诊断</label>
                                    <textarea class="form-control" rows="3" readonly id="txtBox_history"><%:ViewData["UserIllness"] %></textarea>
                             </div>
                            <div class="form-group">
                                    <label>床位：</label>
                                    <input class="form-control" id="Bed_TxtBox"  value="<%:ViewData["UserBed"] %>">
                                </div>
                            <div class="form-group">
                                <label>主治医生：</label>
                                <input class="form-control" readonly value="<%:ViewData["UserDoctor"] %>">
                            </div>
                            <div class="form-group">
                                <label>医生电话：</label>
                                <input class="form-control" readonly value="<%:ViewData["UserDoctorTel"] %>">
                            </div>
                            <div class="form-group">
                                <label>医生邮箱：</label>
                                <input class="form-control" readonly value="<%:ViewData["UserDoctorEmail"] %>">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.col-->
        </div>
        <!-- /.row -->
    </div>
    <!--/.main-->
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="JsContent" runat="server">
    <script>
        $(function () {
            $('#dialog_btn_update').click(function () {
                $tab_Json = eval(JSON.stringify($table.bootstrapTable('getSelections')));
                $("#myModal_Update").modal('hide');
                $.post("/Admin/SetUser", {
                    "name": $('#txtBox_Name').val(),
                    "old": $('#old_TxtBox').val(),
                    "password":$('#txtBox_Password').val(),
                    "sex": $('#sex_Select').val(),
                    "offices": $('#office_Select').val(),
                    "tel": $('#tel_TxtBox').val(),
                    "email": $('#email_TxtBox').val(),
                    "height": $('#height_TxtBox').val(),
                    "weigh": $('#wigh_TxtBox').val(),
                    "time": $("#time_select").val(),
                    "class": "user"
                }, function (data) {
                    if (data=="OK") {
                        alert("修改成功");
                    }
                    else {
                        alert("修改失败");
                    }
                });
                $('#myForm').ajaxSubmit({
                    type: "post",
                    url: "/User/Person",
                    dataType: "json",
                    success: function (data) {
                        
                    }
                });
            });

        });
    </script>

</asp:Content>
